package com.giaothong.controller;

import org.json.JSONObject;

import android.content.Context;

import com.giaothong.http.HttpLoginRequest;
import com.giaothong.http.HttpRegisterRequest;
import com.giaothong.http.core.HttpAsyncCallback;

public class AuthenticationController {
	/**
	 * Login request
	 * 
	 * @param context
	 * @param callback
	 * @param userNam
	 * @param password
	 */
	public static void loginRequest(Context context, HttpAsyncCallback<JSONObject> callback, String userName, String password) {
		HttpLoginRequest httpLoginRequest = new HttpLoginRequest(context, callback);
		httpLoginRequest.request(userName, password);
	}

	/**
	 * register request
	 * 
	 * @param context
	 * @param callback
	 * @param userName
	 * @param password
	 * @param name
	 * @param birthday
	 * @param address
	 * @param email
	 * @param phoneNumber
	 */
	public static void registerRequest(Context context, HttpAsyncCallback<JSONObject> callback, String userName, String password, String name, String address, String email, String phoneNumber) {
		HttpRegisterRequest httpRegisterRequest = new HttpRegisterRequest(context, callback);
		httpRegisterRequest.request(userName, password, name, address, email, phoneNumber);
	}
}
